package chixing.day07.inherited;

public class Animals {
    private String animalsName;
    private float animalsage;
    public Animals()
    {
        System.out.println("无参构造方法");
    }
    public Animals(String animalsName, float animalsage)
    {
        this.animalsName = animalsName;
        this.animalsage = animalsage;
        System.out.println("有参构造方法");
    }

    public String getAnimalsName() {
        return animalsName;
    }

    public void setAnimalsName(String animalsName) {
        this.animalsName = animalsName;
    }

    public float getAnimalsage() {
        return animalsage;
    }

    public void setAnimalsage(float animalsage) {
        this.animalsage = animalsage;
    }

    @Override
    public String toString() {
        return "Animals{" +
                "animalsName='" + animalsName + '\'' +
                ", animalsage=" + animalsage +
                '}';
    }
}
